<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mycss2</title>
    <style>
        .c1 {
            width: 500px;
            border: 1px solid black;
        }
        .c2 {
            width: 100%;  /*宽度为父元素的100%*/
            visibility: hidden;
        }
        .c1:hover .c2 {  /*鼠标悬停在.c1上时，它里面.c2的样式*/
            visibility: visible;
        }
    </style>
</head>
<body>
<div class="c1">
    <img class="c2" src="http://n.sinaimg.cn/default/1_img/upload/3933d981/653/w930h523/20201213/50fa-kffctca8657008.jpg">
</div>
</body>
</html>